package org.ssm.dto;

import org.ssm.entity.SuccessKilled;

import enums.SeckillStateEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 封装秒杀执行后的结果
 * @author gyj
 *
 */
@Getter
@Setter
@ToString
public class SeckillExecution {
    
    private long seckillId;
    
    //秒杀执行结果状态
    private int state;
    
    //状态表示
    private String stateInfo;
    
    //秒杀成功对象
    private SuccessKilled successKilled;

    public SeckillExecution(long seckillId, SeckillStateEnum stateEnum, SuccessKilled successKilled) {
        super();
        this.seckillId = seckillId;
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.successKilled = successKilled;
    }

    public SeckillExecution(long seckillId,SeckillStateEnum stateEnum) {
        super();
        this.seckillId = seckillId;
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
    }

    
}
